package com.itheima.innerclass.局部内部类;

class Outer {
    private int num = 10;
    public void method() {
        int num2 = 20;
        class Inner {
            public void show() {
                System.out.println(num);
                System.out.println(num2);
            }
        }
        Inner i = new Inner();
        i.show();
    }
}
public class OuterDemo {
    /*
    局部内部类，外界是无法直接使用，需要在方法内部创建对象并使用
     */
    public static void main(String[] args) {
        Outer o = new Outer();
        o.method();
    }
}